﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace RMS.Models {
    /* Entity Class for Reservation objects -- holds data for database records */

    public class Reservation {
        [Key]
        public int ResId { get; set; }

        public string Res_Fname { get; set; }

        [Required(ErrorMessage = "Please enter your last name.")]
        public string Res_Lname { get; set; }
       
        public string Res_Address { get; set; }
        public string Res_City { get; set; }
        public string Res_State { get; set; }
        public string Res_Zipcode { get; set; }
        public string Res_Phone { get; set; }
        public string Res_Email { get; set; }
        public string Res_Chosen_Date { get; set; }
        public string Res_Issue_Date { get; set; }
        public bool Res_First_Floor { get; set; }
        public bool Res_Diet_Needs { get; set; }
        public bool Res_Multiple_Guests { get; set; }
        public string Res_Guest_Info { get; set; }
        public bool Res_Pay_Check { get; set; }
        public bool Res_Pay_Credit { get; set; }

        //Mirrors a Ret_ID from the Retreats table
        //public int Ret_ID { get; set; }
        public int Res_RetID { get; set; }

        public int Res_UsID { get; set; }

        public virtual List<OrderLine> OrderLines { get; set; }

        //public virtual List<User> User { get; set; }
        //public User User { get; set; }
    }

    public class OrderLine {
        public int OrderLineId { get; set; }
        public Reservation Reservation { get; set; }
        public Retreat Retreat { get; set; }
        public int Quantity { get; set; }
    }
}
